<?php 
define('HOST','127.0.0.1');
define('UNAME','root');
define('PWD','123456');
define('DB_NAME','zhiwen');
define('PORT','3306');
$conn = mysqli_connect(HOST,UNAME,PWD,DB_NAME,PORT);
if($conn){
	mysqli_query($conn,'SET NAMES UTF8');
}else{
	echo('连接失败，请重试！');
	exit;
}
?>